Some simple examples

Here are some simple things that I've already found useful.

Editing local source

Here's the macro I run to edit local sources. It starts the editor asynchronously on the source file.
/* Edit the file currently displayed in Mosaic */

options results
'get url'
parse var result 'file://localhost/'name
if name ~= "" then address command 'emacs' name
That works in conjunction with:

Display html from the editor

This script works with mg to display the current buffer. You use the
edit macro to start the editor, then this one to display changes.
/* Display the current file in Amiga Mosaic */

'save-buffer'
'rexx-window' window
address AMOSAIC.1 'jump url file://localhost/data:html/Mosaic-Rexx-Interface/'window.4
exit 0

Edit & reload

This digs the editor out of the UUCP environment, then invokes that on the source. If the source is local, you edit that file. If the source is not local, you edit a local copy. After you're through, the new version is displayed in Mosaic.
/* Edit the HTML source to a document. */

options results
'get url'
parse var result 'file://localhost/'name

if name = "" then do

	/* Get a name for the scratch file */
	do i = 0 until ~Exists(name)
		name = "t:wwwtmp"i
		end

	if ~open(out, name, 'Write') then exit 20

	'fetch source'
	call writech out, result
	call close out
	end

address command getuuenv('editor') name
'jump url file://localhost/'name
exit 0

Some scripts I hope to write

If you can think of more examples, feel free to send mail to mwm@contessa.phone.net.
Up to the manual or back to objects.
Mike W. Meyer